package com.xinqi.modules.prepare.common.dto.data;

import com.xinqi.modules.prepare.common.PrepareLimitConstant;
import com.xinqi.common.base.dto.CommonFileDTO;
import com.xinqi.modules.prepare.prepare.enums.PrepareDataTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 备课区资料-数据对象
 *
 * @author wenjie
 * @date 2023/4/13  10:14
 */

@Data
@Schema(description = "备课区资料-数据对象")
public class PrepareDataData {

    /**
     * 备课区id
     */
    @Schema(description = "备课区id", example = "1", hidden = true)
    private Long prepareId;
    /**
     * 备课区文件夹id，如果没有默认为空0
     */
    @Schema(description = "备课区文件夹id，如果没有默认为空0", example = "10001")
    @NotNull(message = "备课区文件夹id不能为空")
    private Long folderId;
    /**
     * 名称
     */
    @Schema(description = "名称", example = "张三")
    @NotBlank(message = "名称不能为空")
    @Size(max = PrepareLimitConstant.NAME_WORKS_LIMIT, message = "名称不能超过15个字")
    private String name;
    /**
     * 资料类型，FILE:文件；URL:外连地址
     */
    @Schema(description = "资料类型，FILE:文件；URL:外连地址", example = "FILE")
    private PrepareDataTypeEnum dataType;
    /**
     * 文件列表
     */
    @Schema(description = "文件列表", example = "文件列表")
    private List<CommonFileDTO> files;
    /**
     * 连接地址
     */
    @Schema(description = "连接地址", example = "https://www.baidu.com")
    private String linkUrl;
}
